<template>
  <div class="layout-demo">
    <div>
      <Button type="link" @click="toggle=!toggle">打开modal</Button>
    </div>
    <Modal 
      title="标题" 
      v-model:visible="toggle"
      @ok="ok"
      @cancel="cancel">
      <template #header>插槽内的标题</template>
      内容
      <p>内容</p> 
      </Modal>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";
let toggle = ref<Boolean>(false);
const ok = ()=>{
  console.log('ok')
  toggle.value = false; 
}
const cancel = ()=>{
  console.log('cancel')
  toggle.value = false; 
}
</script>

